<template>
    <view class="w-full my-2 bg-white">
        <nut-collapse>
            <nut-collapse-item name="name" title="商品介绍">
                <view class="flex flex-col gap-1 py-4" v-for="(item, key) in maps" :key="key">
                    <view class="text-[24rpx] text-[#333] font-bold">{{ item }}</view>
                    <view class="text-[24rpx] text-[#666]" v-if="key != 'details'">{{ props.info[key] || "暂无" }}</view>
                    <view class="text-[24rpx] text-[#666]" v-else v-html="props.info[key]"></view>
                </view>
            </nut-collapse-item>
        </nut-collapse>
    </view>
</template>

<script setup lang="ts">
const props = defineProps({
    info: {
        type: Object,
        default: () => ({})
    }
});
console.log("info 😂😂", props.info);
const maps = {
    "details": "详情",
    "licenseNumber": "产品注册许可证编号",
    "productionLicense": "厂家生产许可证编号",
    "serialNumber": "生产批号",
    "productManual": "产品说明书",
    "storageRequirements": "贮存要求",
    "stackingRequirements": "堆放要求",
    "handlingRequirements": "搬运要求",
}
</script>